using System.Threading.Tasks;
using JNPF.Utils;
using System.Collections.Generic;
using JNPF.Basics.Models;

namespace JNPF.Basics.Logic
{
    public interface CustomeruserIService
    {
        /// <summary>
        /// 获取信息
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns></returns>
        Task<CustomeruserEntity> GetInfo(int id);

        /// <summary>
        /// 获取信息
        /// </summary>
        /// <param name="customerId"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        Task<CustomeruserEntity> GetInfo(int customerId, int type);


        /// <summary>
        /// 列表(分页)
        /// </summary>
        /// <param name="input">请求参数</param>
        /// <returns></returns>
        Task<PageResult<CustomeruserEntity>> GetPageList(CustomeruserListQueryInput input);


        Task<List<CustomeruserEntity>> GetCustomeruserByCustomerId(int customerId);
        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Create(CustomeruserEntity entity);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Update(CustomeruserEntity entity);

        /// <summary>
        /// 分配
        /// </summary>
        /// <param name="customerbase"></param>
        /// <param name="oldCustomerusers"></param>
        /// <param name="newCustomerusers"></param>
        /// <returns></returns>
        Task allot(CustomerbaseEntity customerbase, List<CustomeruserEntity> oldCustomerusers, List<CustomeruserEntity> newCustomerusers);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity">实体对象</param>
        /// <returns></returns>
        Task<int> Delete(CustomeruserEntity entity);

        /// <summary>
        /// 列表
        /// </summary>
        /// <returns></returns>
        Task<List<CustomeruserEntity>> GetList(CustomeruserListQueryInput input);


    }
}
